import java.awt.Insets;
import javax.swing.JFrame;


public class DotGame {
	private final int window_width = 640;
	private final int window_height = 480;
	private DotComponent dotgame;
	private JFrame frame;
	
	public DotGame(){
	
		dotgame = new DotComponent();
		setUpWindow();
		showWindow();
	}
	public void setUpWindow(){
		
		// to set up window
		frame = new JFrame();
		frame.add(dotgame);
		frame.setTitle("dot game");
		frame.setResizable(false);
		frame.addMouseListener(dotgame);
		
	}
	public void showWindow(){
		// to show window
		dotgame.setSize(window_width,window_height);
		frame.pack();
		Insets insets = frame.getInsets();
		frame.setSize(window_width, window_height + insets.top);
		frame.setVisible(true);
		frame.repaint();
							
		
	}
	public static void main(String[] args){
		DotGame dotgame = new DotGame();
		
		
		
	}

	
}

